package com.wyc.apidriver.service.impl;

import com.wyc.apidriver.feign.SsePushFeignClient;
import com.wyc.apidriver.service.PayService;
import com.wyc.internalCommon.constant.IdentityContant;
import com.wyc.internalCommon.request.PushPayInfoDTO;
import com.wyc.internalCommon.result.ApiResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PayServiceImpl implements PayService {

    @Autowired
    private SsePushFeignClient ssePushFeignClient;

    @Override
    public ApiResult pushPayInfo(PushPayInfoDTO pushPayInfoDTO) {
        ssePushFeignClient.push(pushPayInfoDTO.getPassengerId(), IdentityContant.PASSENGER_IDENTITY,pushPayInfoDTO.toString());
        return ApiResult.success();
    }
}
